//
//  DadaCell.m
//  New
//
//  Created by 才诗琦 on 16/1/20.
//  Copyright © 2016年 www.lanou3g.com. All rights reserved.
//

#import "DadaCell.h"

@implementation DadaCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        //图片
        self.imag = [[UIImageView alloc] init];
        _imag.layer.cornerRadius = 5;
        _imag.clipsToBounds = YES;
        [self.contentView addSubview: _imag];
        [_imag release];
        
        //标题
        self.titleLabel = [[UILabel alloc] init];
         _titleLabel.textColor = [UIColor whiteColor];
      _titleLabel.font = [UIFont systemFontOfSize:18];
        [self.contentView addSubview: _titleLabel];
        [_titleLabel release];
        
         //评论
        self.commentCountLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_commentCountLabel];
        [_commentCountLabel release];
        
        
        self.toolLabel = [[UILabel alloc] init];
        _toolLabel.text = @"跟帖";
        [self.contentView addSubview:_toolLabel];
        [_toolLabel release];

    }
    
    return self;
    
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.imag.frame = CGRectMake(10, 10, self.contentView.frame.size.width - 20, 160);
    self.titleLabel.frame = CGRectMake(10, 130, self.contentView.frame.size.width-20, 30);
    
    self.commentCountLabel.frame = CGRectMake(250, 170, 70, 20);
    self.toolLabel.frame = CGRectMake(320, 170, 40, 20);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
